#!/bin/sh
NAME=xautotools
DIR=`pwd`
mkdir /tmp/$USER"$$"xautotools/
cp -R * /tmp/$USER"$$"xautotools/
cd /tmp/$USER"$$"xautotools/
rm *~
rm $NAME/usr/bin/*~
rm $NAME/usr/share/applications/*~
rm $NAME/usr/share/icons/*~
rm $NAME/usr/share/doc/$NAME/*~
find -name '.svn' | xargs rm -r
dpkg-deb --build $NAME
mv $NAME.deb "$DIR"
cd $NAME
tar czf $NAME.tar.gz u* -P --exclude .svn
mv $NAME.tar.gz "$DIR"
cd "$DIR"
rm -r /tmp/$USER"$$"xautotools/
#gzip $NAME.tar

